package edu.sctu.practice.class02.liuli.test.test03;

/**
 * Created by Administrator on 2015/10/15.
 */
public class MyTime {
    private int hour;
    private  int minute;
    private  int second;
    public MyTime(int hour, int minute, int second) {

        this.hour = hour;
        this.minute = minute;
        this.second = second;
    }

    public void display() {

        System.out.println(hour + "时" + minute + "分" + second + "秒");
    }

    public int addHour(int hou) {

        hour += hou;
        return hour;
    }

    public int addMinute(int min) {

        minute += min;
        return hour;
    }

    public int addSecond(int sec) {

        second += sec;
        return second;
    }

    public int subSecond(int sec) {

        second -= sec;
        return second;
    }

    public int subMinute(int min) {

        minute -= min;
        return minute;
    }

    public int subHour(int hou) {

        hour -= hou;
        return hour;
    }

}

